Dynamic Function wizard

The Dynamic Function wizard is used to construct expressions that drive dynamic assets like text, place holders, custom tooltips, and infographics. These assets can be configured in Discover, Illustrate, Present, and Publish.

These dynamic assets are user-defined data-driven items that are linked to a visual.

The Dynamic Function wizard features a point-and-click interface, to easily select configure dynamic PQL or MDX expressions to obtain and display the required information.

Opening the wizard

You can create a Dynamic Function using this wizard in Discover, Present, Publish, and Illustrate:

Related wizards

The Dynamic Placeholder and Actions panels also incorporate a Dynamic Function builder, but they do not require you to define a grid selection for your expression, so no content tree is shown at the top of the panel:

  • Dynamic Placeholders: Access the Dynamic Placeholder panel from Illustrate, Present, and Publish.
  • Actions: Open the Action Panel from Discover, Present, and Publish. The Dynamic Function panel is available when you select to create Advanced slicer actions.

Creating a Dynamic Function

To add a dynamic text variable and set up the dynamic function that replaces it:

  1. Add a Text Field to the canvas and click Dynamic Text > Dynamic Text from the Component ribbon to incorporate the variable.
  2. The Dynamic Function wizard opens at the bottom of the page:

    Note: This panel opens 1) When you first add the Dynamic Text field (as in this step) and 2) When you click the green variable on the canvas after it has been created.

  3. Open the Content drop-down (orange arrow above) and select either the Grid from a discovery or the visual area from a tabulation that you want to base your dynamic formula on.
  4. Once selected, the Grid or visual area opens in the editor (green arrow).

  5. Build your dynamic expression in the script editor (blue arrow):
    • Use the PQL Functions library (yellow highlight) to add SQL expressions to your script. You can hover over the items in the tree to view details of each function and double-click to copy a function into the script editor.
    • Select the relevant cells from the grid to populate the given PQL expressions with data. You can click data cells to add the cell value to your expression or, if your source is a matrix grid, click the label, column header, or row header to add the respective content or total of the column or row values instead.
  6. Note: The example above replaces the variable on the canvas with the label from the cell at 1,0,1 (currently "Bike Racks"). It also formats the returned value in Bold.

  7. Once you are happy with your dynamic expression, you should Test your expression and then click Set to create your dynamic function and close the wizard.
  8. Once you have Set your function, the variable is added to the canvas with a highlighted, green background (purple arrow).

PQL Functions

The Pyramid Query Language (PQL), pronounced "Prequel," is a language built into Pyramid's PYRANA engine to allow users to construct queries that can run against the many SQL data stacks that Pyramid can query natively. PQL includes a vast array of operations and functions that allow users to query data and build analytical logic.

The Dynamic Text Editor exposes Dynamic and Common functions. Dynamic functions are a set of specialized methods that are designed to act on a given query 's result set. Common functions are a set of methods that are found in most programmatic and mathematical function libraries. These functions are used to perform logic on basic data without concern for data structures, context, or even source.

To add a PQL function from the library to the script editor, simply double-click on it. You will then need to inject values into the function.

Using the LLM PQL Function

Pyramid's Generative AI integration enables you to use AI to generate scripts and images, dynamic text and infographics, calculations and lists, schedules, colors, and more. It allows you to generate a range of content, including complex code, simply by providing a text prompt.

Tip: You can use the LLM PQL function (from the Common PQL functions) to generate dynamic text, adding the results to custom tooltips, text fields, or into your PQL formulas. While this function cannot tell you about your data set, it can add additional information and background to your presentation or publication.

Warning: When using LLMs, your assets are generated using public domain algorithms. This can produce erroneous and inconsistent or random results. Use at your own risk.

Example Dynamic Functions